<template>
  <div class="home">
    <!-- 路由出口 -->

    <keep-alive include="find,shareList">
      <router-view></router-view>
    </keep-alive>
    <div v-if="$route.meta.needTab">
      <van-tabbar
        active-color="#e40137"
        inactive-color="#b4b4bd"
        placeholder
        route
        class="tabbar"
      >
        <van-tabbar-item to="/home/homepage">
          <template #default>
            <div>
              主页
            </div>
          </template>
          <template #icon>
            <i class="iconfont">&#xe61d;</i>
          </template>
        </van-tabbar-item>
        <van-tabbar-item to="/home/questions">
          <template #default>
            <div>
              搜索
            </div>
          </template>
          <template #icon>
            <i class="iconfont">&#xe669;</i>
          </template>
        </van-tabbar-item>
        <van-tabbar-item to="/home/article">
          <template #default>
            <div>
              文章
            </div>
          </template>
          <template #icon>
            <i class="iconfont">&#xe60b;</i>
          </template>
        </van-tabbar-item>
        <van-tabbar-item to="/home/my">
          <template #default>
            <div>
              我的
            </div>
          </template>
          <template #icon>
            <i class="iconfont">&#xe600;</i>
          </template>
        </van-tabbar-item>
      </van-tabbar>
    </div>
  </div>
</template>

<script>
export default {}
</script>

<style lang="less" scoped>
.home {
  .tabbar {
    height: 60px;
    .iconfont {
      font-size: 28px;
    }
  }
}
</style>
